home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / libs / pdcurs21 / portable / nodelay.c < prev    next >
C/C++ Source or Header  |  1993-06-18  |  1KB  |  48 lines

  1. #define    CURSES_LIBRARY    1
  2. #include <curses.h>
  3. #undef    nodelay
  4.  
  5. #ifdef PDCDEBUG
  6. char *rcsid_nodelay = "$Header: C:\CURSES\portable\RCS\nodelay.c 2.1 1993/06/18 20:20:37 MH Rel MH $";
  7. #endif
  8.  
  9.  
  10.  
  11.  
  12. /*man-start*********************************************************************
  13.  
  14.   nodelay()    - disable block during read
  15.  
  16.   X/Open Description:
  17.      This function controls whether wgetch() is a non-blocking
  18.      call. If the option is enabled, and no input is ready, wgetch()
  19.      will return ERR. If disabled, wgetch() will hang until input
  20.      is ready.
  21.  
  22.   PDCurses Description:
  23.      There is no additional PDCurses functionality for this function.
  24.  
  25.   X/Open Return Value:
  26.      This function returns OK on success and ERR on error.
  27.  
  28.   X/Open Errors:
  29.      No errors are defined for this function.
  30.  
  31.   Portability:
  32.      PDCurses    int nodelay( WINDOW* win, bool bf );
  33.      X/Open Dec '88    int nodelay( WINDOW* win, bool bf );
  34.      BSD Curses    int nodelay( WINDOW* win, bool bf );
  35.      SYS V Curses    int nodelay( WINDOW* win, bool bf );
  36.  
  37. **man-end**********************************************************************/
  38.  
  39. int    nodelay( WINDOW *win, bool flag )
  40. {
  41. #ifdef PDCDEBUG
  42.     if (trace_on) PDC_debug("nodelay() - called\n");
  43. #endif
  44.  
  45.     win->_nodelay = flag;
  46.     return( OK );
  47. }
  48.